package com.application.Tree;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.Log;

public class MenuItem {
	private int id;
	private float x, y;
	private float width=TreeMenu.ITEM_HEIGHT;
	private float height=TreeMenu.ITEM_HEIGHT;
	private Bitmap image;

	public MenuItem(int id, float x, float y, Bitmap image) {
		super();
		this.id = id;
		this.x = x;
		this.y = y;
		this.image = image;
	}

	public boolean isConllison(float x, float y) {
		return (x > this.x && x < this.x + this.height && y > this.y && y < this.y
				+ this.height);
	}
	public void onDraw(Canvas canvas){
		Paint paint=new Paint();
		paint.setAntiAlias(true);
		paint.setStrokeWidth(3);
		RectF dst=new RectF(this.x, this.y, this.x+this.width, this.y+this.height);		
		canvas.drawBitmap(image, null, dst, paint);				
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

	public Bitmap getImage() {
		return image;
	}

	public void setImage(Bitmap image) {
		this.image = image;
	}
	
	
}
